home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 48
/
Amiga Format CD48 (1999-12-13)(Future Publishing)(GB)(Track 1 of 2)[!][issue 2000-01].iso
/
-websites-
/
whdload
/
games
/
uridium2.lha
/
U2Install
/
Install_Uridium-II
< prev
next >
Wrap
Text File
|
1997-08-31
|
4KB
|
195 lines
;
;$VER: Uridium-II HD Installer script v1.05 (c) 1997 John Girvin
;
;---------------------------------------------------------------------------
;
; Make a disk image
;
(procedure S_MakeDisk #UDISKNUM
(
(set #UDATFILE (tackon #UDESTDIR (cat "Disk." #UDISKNUM)))
(message
(cat
"\n\n\nPlease insert Uridium-II Disk "
#UDISKNUM
" in drive DF0:\n\n"
"*** WARNING ***\n"
"Multitasking will be disabled while the disk image"
" is being created. After inserting the disk, please"
" ensure that all disk and network activity has finished"
" before clicking 'Proceed'.\n\n"
"Click 'Proceed' when ready."
)
)
(working
(cat "Creating image of disk " #UDISKNUM " in '" #UDATFILE "'\n\n"
"*** Multitasking is disabled. DON`T PANIC! ***"
)
)
(set #URCODE (run (cat "U2MakeDat " #UDATFILE)))
(if (>= #URCODE 100)
(abort
(cat
"Could not create image of disk "
#UDISKNUM
" !\n\nError: " #URCODE
)
)
)
))
;---------------------------------------------------------------------------
;
; Do the install
;
; - get dir to install in
; - create drawer
; - copy the drawer icon
; - create the disk images
;
(procedure S_Install
(
;
; Get directory to install U2 in
;
(set #UROOTDIR
(askdir
(prompt "Where would you like Uridium-II installed?\n"
"(a new drawer called 'Uridium-II' will be created here)"
)
(help @askdir-help)
(default #UROOTDIR)
)
)
(set #UDESTDIR (tackon #UROOTDIR "Uridium-II/"))
(set @default-dest #UDESTDIR)
;
; Create the installation directory
;
(makedir #UDESTDIR
(prompt "I will now create the directory '" #UDESTDIR "'")
(help @makedir-help)
(infos)
(confirm)
)
;
; Copy disk drawer icon
;
(copyfiles
(prompt "Copying HD drawer icon")
(help @copyfiles-help)
(source "Uridium-II.inf")
(newname "Uridium-II.info")
(dest #UROOTDIR)
(nogauge)
(optional fail force)
)
;
; Install disk 1
;
(S_MakeDisk 1)
;
; Determine name of slave patch file
;
(if (database "chiprev" "AA")
(set #USLAVENAME (cat #URCODE "2.gpch"))
(set #USLAVENAME (cat #URCODE "1.gpch"))
)
;
; Create slave from base file and patch
;
(working "Creating slave program")
(set #URCODE
(run
(cat "GPatch U2Slave.base "
#USLAVENAME " "
(tackon #UDESTDIR "Uridium-II_HD")
)
)
)
(if (<> #URCODE 0)
(abort
(cat "Slave generation failed error " #URCODE)
)
)
;
; Install disk 2
;
(S_MakeDisk 2)
))
;---------------------------------------------------------------------------
(welcome "Welcome to the Uridium-II Hard Drive Installer")
(set @app-name (cat "Uridium-II_HD"))
(set #UROOTDIR "DH0:")
(set #UDESTDIR "")
(if (<> @user-level 2)
(abort "You must select 'Expert' user level")
)
(message "\n\nWelcome to the Uridium-II Hard Drive Installer\n"
"(c) 1997 John Girvin\n\n"
"Please read the documentation thoroughly before"
" attempting to use this installer!\n\n"
"This is version 1.05\n\n"
"Click 'Proceed' to begin."
)
(S_Install)
;
; Delete config file if it exists
; Only used in v1.04 and earlier
;
(set #UDATFILE (tackon #UDESTDIR "u2config.bin"))
(if (exists #UDATFILE (noreq))
(delete #UDATFILE
(optional force)
)
)
;
; Copy WHDload
;
(copyfiles
(prompt "Copying WHDLoad program")
(help @copyfiles-help)
(source "WHDLoad")
(dest #UDESTDIR)
(nogauge)
(noposition)
(optional fail force)
)
;
; Copy slave icon
;
(copyfiles
(prompt "Copying slave program icon")
(help @copyfiles-help)
(source "Uridium-II_HD.inf")
(newname "Uridium-II_HD.info")
(dest #UDESTDIR)
(nogauge)
(optional fail force)
)